package com.sgb.kjwl.view.ui.adapter.material;

import android.content.Context;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.BindBankCardListEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class BankCardAdapter extends BaseRecycleAdapter<BindBankCardListEntity> {
    public BankCardAdapter(Context context, List<BindBankCardListEntity> datas, int tag) {
        super(context, tag, datas);

    }

    @Override
    public void convert(ItemViewHolder holder, final BindBankCardListEntity entity) {
        holder.setBinding(BR.viewModel, entity);
        holder.setText(R.id.tv_name, entity.bankName + "(" + entity.bankAccount.substring(0, 4) +
                " **** **** " + entity.bankAccount.substring(entity.bankAccount.length() - 4) + ")");
    }

}
